package org.carabiner.infinitest;

import javax.swing.DefaultListModel;

/**
 * A list model that holds and processes test results, for display in a JList
 * 
 * @author bjrady
 *
 */
public class ResultListModel extends DefaultListModel implements TestStatusListener
{  
  public void testFailed(TestEvent e)
  {
    if (!contains(e.getTestName()))
      addElement(e.getTestName());    
  }

  public void testSucceeded(TestEvent event)
  {
    removeElement(event.getTestName());
  }
}
